package com.uwantsoft.interfaces.web.controller.restful;

import com.uwantsoft.business.facade.ParkingFacadeImpl;
import com.uwantsoft.business.facade.dto.parking.ParkingDto;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author LeiPeichen.
 */
@RestController
@RequestMapping("/api/v1")
public class ParkingController {

    @Resource(name = "parkingFacade")
    private ParkingFacadeImpl parkingFacade;

    @RequestMapping(value = "/parks",method = RequestMethod.GET)
    private List<ParkingDto> parks(String region,String latitude,String longitude){
        return parkingFacade.obtainParks(region, latitude, longitude);
    }
}
